﻿using System;
using System.Collections.Generic;

namespace WFRPDice
{
    public static class DiceCup
    {
        public static DiceRollResult RollDice(List<Die> pl, Random rnd)
        {
            var symbols = new List<DiceSymbol>();
            foreach (Die d in pl)
            {
                symbols.Add(d.Roll(d, rnd));
                if (d.Symbols.Equals(DiceSymbol.RighteousSuccess))
                {
                    pl.Add(d);
                }
            }
            var results = new DiceRollResult(symbols);
            return results;
        }
    }
}